package com.groupbuying.sysconfig.service.impl;

import com.groupbuying.sysconfig.constants.CommonConstants;
import com.groupbuying.sysconfig.constants.ConfigBusinessEnumConstants;
import com.groupbuying.sysconfig.constants.ConfigBusinessSearchConstants;
import com.groupbuying.sysconfig.constants.SysconfigDeploySearchConstants;
import com.groupbuying.sysconfig.domain.SysconfigDeployDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.groupbuying.sysconfig.dao.ConfigBusinessDao;
import com.groupbuying.sysconfig.domain.ConfigBusinessDO;
import com.groupbuying.sysconfig.service.ConfigBusinessService;



@Service
public class ConfigBusinessServiceImpl implements ConfigBusinessService {
	@Autowired
	private ConfigBusinessDao configBusinessDao;
	
	@Override
	public ConfigBusinessDO get(String id){
		return configBusinessDao.get(id);
	}
	
	@Override
	public List<ConfigBusinessDO> list(Map<String, Object> map){
		return configBusinessDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return configBusinessDao.count(map);
	}
	
	@Override
	public int save(ConfigBusinessDO configBusiness){
		return configBusinessDao.save(configBusiness);
	}
	
	@Override
	public int update(ConfigBusinessDO configBusiness){
		return configBusinessDao.update(configBusiness);
	}
	
	@Override
	public int remove(String id){
		return configBusinessDao.remove(id);
	}
	
	@Override
	public int batchRemove(String[] ids){
		return configBusinessDao.batchRemove(ids);
	}
	/**
	 * @des 银盛业务-环境-参数信息
	 * @param
	 * @return java.lang.String
	 */
	@Override
	public String getYSBusinessPram() {
		Map searchMap = new HashMap();
		searchMap.put(ConfigBusinessSearchConstants.SEARCH_ENVIRONMENTTYPE, ConfigBusinessEnumConstants.ENUM_ENVIRONMENT_DEV);
		searchMap.put(ConfigBusinessSearchConstants.SEARCH_BUSINESSNO, ConfigBusinessEnumConstants.ENUM_BUSINESS_YS);
		ConfigBusinessDO configBusinessDO=(ConfigBusinessDO)this.list(searchMap).get(0);
		return configBusinessDO.getParameter();
	}

}
